package com.team.dutchboy.service;

import com.team.dutchboy.config.sentinel.FeignFallback;
import com.team.dutchboy.config.sentinel.FeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

//@FeignClient(value = "mpc",fallback = FeignFallback.class)
@FeignClient(value = "mpc",fallbackFactory = FeignFallbackFactory.class)
public interface FeignDemo {

    @RequestMapping("/mpc/push/{message}")
    String callPush(@PathVariable("message") String message);

    //一定要在入参加注解，参数传递可能出错
    @RequestMapping("/mpc/test")
    String remoteTest(@RequestParam("a") String a);

    @RequestMapping("/mpc/seata")
    String testSeata(@RequestParam("a") String a);

}
